package com.blog.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Table(name="post")
@Entity
@NamedQueries(
        @NamedQuery(name = "getTop10Post", query = "select p from Post p order by p.id desc")
)
public class Post implements Serializable {
    private static final long serialVersionUID = 1036499957123431883L;

    @Id
    private long id;
    private String title;

    public long getId() {
        return id;
    }
    public void setId(long id) {
        this.id = id;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
}
